home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / C Internet Config / IC Libraries ƒ / IC Headers ƒ / IC API Descriptions.h < prev    next >
Encoding:
Text File  |  1995-11-17  |  21.4 KB  |  172 lines  |  [TEXT/SPM ]

  1. ty string then URLs of that form are not allowed.
  2.     data points to the start of the text. It must not be nil.
  3.     len indicates the length of the text. It must be non-negative.
  4.     selStart and selEnd should be passed in as the current selection of
  5.     the text. This selection is given in the same manner as TextEdit,
  6.     ie if selStart = selEnd then there is no selection only an insertion
  7.     point. Also selStart ≤ selEnd and 0 ≤ selStart ≤ len and 0 ≤ selEnd ≤ len.
  8.     selStart and selEnd are returned as the bounds of the URL. If the
  9.     routine returns an error then these new boundaries may be
  10.     invalid but they will be close.
  11.     The incoming url handle must not be nil.  The resulting URL is normalised
  12.     and copied into the url handle, which is resized to fit.
  13. */
  14.  
  15. ICError ICLaunchURL(ICInstance inst,StringPtr hint,Ptr data,long len,long* selStart,long* selEnd);
  16. /*
  17.     Requires IC 1.1.
  18.     You must specify a configuration before calling this routine.
  19.     You do not have to be inside an ICBegin/End pair to call this routine.
  20.     Parses a URL out of the specified text and feeds it off to the
  21.     appropriate helper.
  22.     hint indicates the default scheme for URLs of the form "name@address".
  23.     If hint is the empty string then URLs of that form are not allowed.
  24.     data points to the start of the text. It must not be nil.
  25.     len indicates the length of the text. It must be non-negative.
  26.     selStart and selEnd should be passed in as the current selection of
  27.     the text. This selection is given in the same manner as TextEdit,
  28.     ie if selStart = selEnd then there is no selection only an insertion
  29.     point. Also selStart ≤ selEnd and 0 ≤ selStart ≤ len and 0 ≤ selEnd ≤ len.
  30.     selStart and selEnd are returned as the bounds of the URL. If the
  31.     routine returns an error then these new boundaries may be
  32.     invalid but they will be close.
  33.     The URL is parsed out of the text and passed off to the appropriate
  34.     helper using the GURL AppleEvent.
  35. */
  36.  
  37. /* ***** Mappings Routines *****
  38.  * 
  39.  * Routines for interrogating mappings database.
  40.  * 
  41.  * ----- High Level Routines -----
  42.  */
  43.  
  44. ICError ICMapFilename(ICInstance inst,StringPtr filename,ICMapEntry* entry);
  45. /*
  46.     Requires IC 1.1.
  47.     You must specify a configuration before calling this routine.
  48.     If you are getting or setting multiple preferences, you should place
  49.     these calls within an ICBegin/ICEnd pair.
  50.     If you call this routine outside of such a pair, it implicitly
  51.     calls ICBegin(inst, icReadWritePerm).
  52.     Takes the name of an incoming file and returns the most appropriate
  53.     mappings database entry, based on its extension.
  54.     filename must not be the empty string.
  55.     Returns icPrefNotFoundErr if no suitable entry is found.
  56. */
  57.  
  58. ICError ICMapTypeCreator(ICInstance inst,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry);
  59. /*
  60.     Requires IC 1.1.
  61.     You must specify a configuration before calling this routine.
  62.     You must be inside an ICBegin/End pair to call this routine.
  63.     Takes the type and creator (and optionally the name) of an outgoing
  64.     file and returns the most appropriate mappings database entry.
  65.     The filename may be either the name of the outgoing file or
  66.     the empty string.
  67.     Returns icPrefNotFoundErr if no suitable entry found.
  68. */
  69.  
  70. /* ----- Mid Level Routines ----- */
  71.  
  72. ICError ICMapEntriesFilename(ICInstance inst,Handle entries,StringPtr filename,ICMapEntry* entry);
  73. /*
  74.     Requires IC 1.1.
  75.     You must specify a configuration before calling this routine.
  76.     You do not have to be inside an ICBegin/End pair to call this routine.
  77.     Takes the name of an incoming file and returns the most appropriate
  78.     mappings database entry, based on its extension.
  79.     entries must be a handle to a valid IC mappings database preference.
  80.     filename must not be the empty string.
  81.     Returns icPrefNotFoundErr if no suitable entry is found.
  82. */
  83.  
  84. ICError ICMapEntriesTypeCreator(ICInstance inst,Handle entries,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry);
  85. /*
  86.     Requires IC 1.1.
  87.     You must specify a configuration before calling this routine.
  88.     You do not have to be inside an ICBegin/End pair to call this routine.
  89.     Takes the type and creator (and optionally the name) of an outgoing
  90.     file and returns the most appropriate mappings database entry.
  91.     entries must be a handle to a valid IC mappings database preference.
  92.     The filename may be either the name of the outgoing file or
  93.     the empty string.
  94.     Returns icPrefNotFoundErr if no suitable entry found.
  95. */
  96.  
  97. /* ----- Low Level Routines ----- */
  98.  
  99. ICError ICCountMapEntries(ICInstance inst,Handle entries,long* count);
  100. /*
  101.     Requires IC 1.1.
  102.     You must specify a configuration before calling this routine.
  103.     You do not have to be inside an ICBegin/End pair to call this routine.
  104.     Counts the number of entries in the mappings database.
  105.     entries must be a handle to a valid IC mappings database preference.
  106.     count is set to the number of entries.
  107. */
  108.  
  109. ICError ICGetIndMapEntry(ICInstance inst,Handle entries,long ndx,long* pos,ICMapEntry* entry);
  110. /*
  111.     Requires IC 1.1.
  112.     You must specify a configuration before calling this routine.
  113.     You do not have to be inside an ICBegin/End pair to call this routine.
  114.     Gets the ndx'th entry in the mappings database.
  115.     entries must be a handle to a valid IC mappings database preference.
  116.     ndx must be in the range from 1 to the number of entries in the database.
  117.     The value of pos is ignored on input. pos is set to the position of
  118.     the ndx'th entry in the database and is suitable for passing back
  119.     into ICSetMapEntry.
  120.     Does not return any user data associated with the entry.
  121. */
  122.  
  123. ICError ICGetMapEntry(ICInstance inst,Handle entries,long pos,ICMapEntry* entry);
  124. /*
  125.     Requires IC 1.1.
  126.     You must specify a configuration before calling this routine.
  127.     You do not have to be inside an ICBegin/End pair to call this routine.
  128.     Returns the entry located at position pos in the mappings database.
  129.     entries must be a handle to a valid IC mappings database preference.
  130.     pos should be 0 to get the first entry. To get the subsequent entries, add
  131.     entry.total_size to pos and iterate.
  132.     Does not return any user data associated with the entry.
  133. */
  134.  
  135. ICError ICSetMapEntry(ICInstance inst,Handle entries,long pos,ICMapEntry* entry);
  136. /*
  137.     Requires IC 1.1.
  138.     You must specify a configuration before calling this routine.
  139.     You do not have to be inside an ICBegin/End pair to call this routine.
  140.     Sets the entry located at position pos in the mappings database.
  141.     entries must be a handle to a valid IC mappings database preference.
  142.     pos should be either a value returned from ICGetIndMapEntry or a value
  143.     calculated using ICGetMapEntry.
  144.     entry is a var parameter purely for stack space reasons. It is not
  145.     modified in any way.
  146.     Any user data associated with the entry is unmodified.
  147. */
  148.  
  149. ICError ICDeleteMapEntry(ICInstance inst,Handle entries,long pos);
  150. /*
  151.     Requires IC 1.1.
  152.     You must specify a configuration before calling this routine.
  153.     You do not have to be inside an ICBegin/End pair to call this routine.
  154.     Deletes the mappings database entry at pos.
  155.     entries must be a handle to a valid IC mappings database preference.
  156.     pos should be either a value returned from ICGetIndMapEntry or a value
  157.     calculated using ICGetMapEntry.
  158.     Also deletes any user data associated with the entry.
  159. */
  160.  
  161. ICError ICAddMapEntry(ICInstance inst,Handle entries,ICMapEntry* entry);
  162. /*
  163.     Requires IC 1.1.
  164.     You must specify a configuration before calling this routine.
  165.     You do not have to be inside an ICBegin/End pair to call this routine.
  166.     Adds an entry to the mappings database.
  167.     entries must be a handle to a valid IC mappings database preference.
  168.     The entry is added to the end of the entries database.
  169.     No user data is added.
  170. */
  171. #endif
  172.